cmake_minimum_required(VERSION 3.14)

project(TinyRender_Test VERSION 1.0)

# support "$ make test" command
enable_testing()

# link against gtest or gtest_main as needed
add_executable(${PROJECT_NAME} myEigen_Test.cpp transform_Test.cpp)
target_link_libraries(${PROJECT_NAME}
	tinyrenderlib
	gtest_main
)

add_test(NAME myEigen_Test COMMAND ${PROJECT_NAME})

# post build command
add_custom_command(
	TARGET ${PROJECT_NAME}
	COMMENT "Run tests"
	POST_BUILD
	COMMAND ${PROJECT_NAME}
)